package  com.na.onlineservey.interview

import com.docu.common.Action
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import com.na.onlineservey.InterviewService

@Component("readInterviewAction")
class ReadInterviewAction extends Action {

  @Autowired
  InterviewService interviewInstanceService

  public Object preCondition(Object params, Object object) {
      //Not implement
      return null
  }

   public Object execute(Object params, Object object) {
    try {
       return interviewInstanceService.read(Long.parseLong(params.id))
     } catch (Exception ex) {
     log.error(ex.message)
        return null
    }
  }

  public Object postCondition(Object params, Object object) {
    //Not implement
    return null
  }
}